package com.example.extenddemo.entity;

import com.example.extenddemo.config.MyJson;
import com.example.extenddemo.handle.CustomJsonDeserializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class JsonDemo implements Serializable {
    @Serial
    private static final long serialVersionUID = -3743669197412631313L;
    @MyJson(Key = "userName")
    @JsonDeserialize(using = CustomJsonDeserializer.class)
    private String name;

    private Integer age;
}
